-
Notifications
You must be signed in to change notification settings - Fork 15.2k
[Github][CI] Add quotes to 'find' command argument #162570
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@llvm/pr-subscribers-github-workflow Author: Baranov Victor (vbvictor) ChangesIt appears that new Build Tooling CI Containers job run didn't actually push containers, but failed with error:
Proposed fix is in error message and I confirmed locally with such setup: $ ls -la
a.sh
ghcr.io-ci-a.tar
ghcr.io-ci-b.tar
$ cat a.sh
for f in $(find . -iname '*.tar'); do
echo $f
done
$ ./a.sh # lists fine with quotes but fails without. Thought not sure how Full diff: https://github.com/llvm/llvm-project/pull/162570.diff 2 Files Affected:
diff --git a/.github/workflows/build-ci-container-tooling.yml b/.github/workflows/build-ci-container-tooling.yml
index 8095a68cfda9e..7dd05f64ccd39 100644
--- a/.github/workflows/build-ci-container-tooling.yml
+++ b/.github/workflows/build-ci-container-tooling.yml
@@ -101,7 +101,7 @@ jobs:
}
podman login -u ${{ github.actor }} -p $GITHUB_TOKEN ghcr.io
- for f in $(find . -iname *.tar); do
+ for f in $(find . -iname '*.tar'); do
image_name=$(podman load -q -i $f | sed 's/Loaded image: //g')
push_container $image_name
diff --git a/.github/workflows/build-ci-container.yml b/.github/workflows/build-ci-container.yml
index 01f1b8dc4f990..027c558afdd0b 100644
--- a/.github/workflows/build-ci-container.yml
+++ b/.github/workflows/build-ci-container.yml
@@ -103,7 +103,7 @@ jobs:
}
podman login -u ${{ github.actor }} -p $GITHUB_TOKEN ghcr.io
- for f in $(find . -iname *.tar); do
+ for f in $(find . -iname '*.tar'); do
image_name=$(podman load -q -i $f | sed 's/Loaded image: //g')
push_container $image_name
|
@boomanaiden154, Now the job fails with error:
Googling the problem I found GH discussion, StackOW, that suggest to change package settings, but I have only "open issue" button in Could you do this if you have proper rights? Was it a problem before? |
You need to run the workflow a couple times. #133625 |
https://github.com/llvm/llvm-project/actions/runs/18360684500/job/52304955343 succeeded after running ~5 times. It should be good from here on out. |
It appears that new [Build Tooling CI Containers](https://github.com/llvm/llvm-project/actions/runs/18359418540/job/52299833688) job run didn't actually push containers, but failed with error: ``` find: paths must precede expression: `ghcr.io-llvm-amd64-ci-ubuntu-24.04-lint-f1eb7e55428e.tar' find: possible unquoted pattern after predicate `-iname'? ``` Proposed fix is in error message and I confirmed locally with such setup: ```bash $ ls -la a.sh ghcr.io-ci-a.tar ghcr.io-ci-b.tar $ cat a.sh for f in $(find . -iname '*.tar'); do echo $f done $ ./a.sh # lists fine with quotes but fails without. ``` Thought not sure how `Build CI Container` job push successfully: I manually downloaded 900MB `tar` AMD-archive with two containers and failed to `for`-loop over them without quotes, hence I add them to that script as well.
It appears that new [Build Tooling CI Containers](https://github.com/llvm/llvm-project/actions/runs/18359418540/job/52299833688) job run didn't actually push containers, but failed with error: ``` find: paths must precede expression: `ghcr.io-llvm-amd64-ci-ubuntu-24.04-lint-f1eb7e55428e.tar' find: possible unquoted pattern after predicate `-iname'? ``` Proposed fix is in error message and I confirmed locally with such setup: ```bash $ ls -la a.sh ghcr.io-ci-a.tar ghcr.io-ci-b.tar $ cat a.sh for f in $(find . -iname '*.tar'); do echo $f done $ ./a.sh # lists fine with quotes but fails without. ``` Thought not sure how `Build CI Container` job push successfully: I manually downloaded 900MB `tar` AMD-archive with two containers and failed to `for`-loop over them without quotes, hence I add them to that script as well.
It appears that new Build Tooling CI Containers job run didn't actually push containers, but failed with error:
Proposed fix is in error message and I confirmed locally with such setup:
Thought not sure how
Build CI Container
job push successfully: I manually downloaded 900MBtar
AMD-archive with two containers and failed tofor
-loop over them without quotes, hence I add them to that script as well.